linux.samba
[Top] [All Lists]

Re: [Samba] Samba permissions

Subject: Re: [Samba] Samba permissions
From: Keith Warno
Date: Fri, 29 Jul 2005 18:20:25 +0200
Newsgroups: linux.samba
* <krjw@xxxxxxxxxxx> [29/07/2005 1205EDT]:
[...]
> However, your new directory *inherited* the setgid bit (effectively a
> bitwise OR); this is simply the behavior of setgid bits on directories.
> From the man page for the stat() system call (section 2):
> 
> The set GID bit (S_ISGID) has several special uses: For a
> directory  it indicates  that  BSD  semantics is to be used for
> that directory: files created there inherit their group ID from
> the directory, not  from  the effective  gid  of  the creating
> process, and directories created there will also get the S_ISGID
> bit set.  For a file that does not  have  the group  execution
> bit (S_IXGRP) set, it indicates mandatory file/record locking.
> 
> So, for your case:
> 
>       (3770 & 0777) | 2000 = 2770

I hate replying to my own mails, but just to clarify it'd make more
sense to write the above like so:
        
0777|2000 = 2777 = new dir mode before 'directory mask' 3770 is applied
2777&3770 = 2770 = new dir mode after directory mask is applied

-- 
SA Valaran Corp
GPG: 0xEC705AE9
I put the sh in IT.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba
<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy